Skip to content

Document Linkify match options - #544

Merged
jonathanpeppers merged 4 commits into
mainfrom
jonathanpeppers-document-text-util-apis
Aug 17, 2026
Merged

Document Linkify match options#544
jonathanpeppers merged 4 commits into
mainfrom
jonathanpeppers-document-text-util-apis

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Aug 15, 2026

Copy link
Copy Markdown
Member

Refs #186

Sources

  • Android Linkify reference: Linkify mask behavior and the Android 8.1-and-earlier WebView-update exception note.
  • AOSP Linkify.java: ALL composition and Android deprecation/avoidance guidance for ALL and MAP_ADDRESSES.

Validation

  • Parsed docs/xml/Android.Text.Util/MatchOptions.xml with PowerShell's XML parser.
  • Confirmed 162 CRLF sequences and zero lone LF characters in the edited file.
  • Ran git diff --check.
  • Generated ECMA2Yaml preview and confirmed the published All and MapAddresses summaries use managed ITextClassifier.GenerateLinks, WebView.FindAddress, and Linkify xrefs; no Java-form API prose remains.

Refs #186

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the XML documentation for Android.Text.Util.MatchOptions by replacing placeholder summaries with descriptive text for the Linkify-related flag values, aligning the docs with the Android Linkify reference.

Changes:

  • Documented the EmailAddresses match option (bit-field flag).
  • Documented the PhoneNumbers match option (bit-field flag).
  • Documented the WebUrls match option (bit-field flag).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

1 similar comment
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All and MapAddresses remain undocumented even though both are public flags with important deprecated behavior. All includes MapAddresses, whose upstream implementation has documented limitations and can throw on Android 8.1 and earlier, while the managed fields have no [Obsolete] warning. Please document their composition, deprecation, and avoidance guidance in publishing-supported content: MatchOptions.xml.

Refs #186

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aac317fb-e820-4251-a4cf-99af9e32bd38
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto Addressed the requested documentation: All now states that it includes MapAddresses; both public flags include the Android deprecation and avoidance guidance; and the source-backed Android 8.1/API 27-and-earlier WebView-update exception is documented. No managed [Obsolete] metadata was added.

@jonathanpeppers
jonathanpeppers requested review from dalexsoto and removed request for dalexsoto August 16, 2026 13:38
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The All and MapAddresses summaries now cover composition and basic status, but all deprecation, avoidance, WebView limitation, and Android 8.1 exception guidance is still placed in enum-field <remarks>, which ECMA2Yaml ignores. Please move the essential warnings into published member summaries or type-level remarks and verify the generated preview: MatchOptions.xml.

Refs #186

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aac317fb-e820-4251-a4cf-99af9e32bd38
@jonathanpeppers

jonathanpeppers commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@dalexsoto Addressed the publishing-surface feedback in commit 9aa5f432: moved the required deprecation, avoidance, WebView.findAddress(String) limitation, and Android 8.1/API 27-and-earlier exception guidance into the All and MapAddresses member summaries. I generated Android.Text.Util.MatchOptions.yml with ECMA2Yaml and verified both published YAML summary fields contain that guidance.

@jonathanpeppers
jonathanpeppers requested review from dalexsoto and removed request for dalexsoto August 16, 2026 16:34

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warnings now publish, but their text uses Java APIs (TextClassifier.generateLinks, WebView.findAddress) instead of managed ITextClassifier.GenerateLinks and WebView.FindAddress, and says "methods in this class" although the class is MatchOptions rather than Linkify. GenerateLinks is also API 28+, so it is unavailable on the API 27-and-earlier path discussed. Please use managed crefs, identify Linkify explicitly, and retain valid older-platform guidance.

Refs #186

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aac317fb-e820-4251-a4cf-99af9e32bd38
@jonathanpeppers

jonathanpeppers commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@dalexsoto Addressed the wording feedback in commit 516581e9: the published summaries now use managed ITextClassifier.GenerateLinks and WebView.FindAddress crefs, explicitly identify Linkify as the throwing API, and recommend GenerateLinks only on API level 28 and later. The Android 8.1/API 27-and-earlier warning remains without recommending GenerateLinks on that path. ECMA2Yaml preview confirms the published managed xrefs.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MatchOptions warnings now publish with correct managed crefs, Linkify context, API-level guidance, and older-platform limitations.

@jonathanpeppers
jonathanpeppers merged commit 30f6b03 into main Aug 17, 2026
3 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-document-text-util-apis branch August 17, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants